package com.sumainfor.pc.market.service.tenant.impl;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.dao.tenant.TenantHousingEvaMapper;
import com.sumainfor.pc.market.service.tenant.TenantHousingEvaService;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 查新房源信息
 * <p>
 *
 * @author: zhoucong
 * @create: 2019-04-17 13:35
 **/
@Service
public class TenantHousingEvaServiceImpl implements TenantHousingEvaService {

    @Autowired
    TenantHousingEvaMapper tenantHousingEvaMapper;

    @Override
    public JsonResult getTenantHousing(Map<String,Object> params){
    JsonResult result = new JsonResult();
        List<Map<String,Object>> paraList = tenantHousingEvaMapper.getTenantHousing(params);
        System.out.println("paraList"+paraList);
        for (Map<String,Object> para:paraList) {
            String str = MapUtils.getString(para,"HouInfoId");
            String str2 = str.substring(str.length()-1,str.length());
            para.put("last",str2);
        }
        System.out.println("srrsr"+paraList);
    return  result.put(paraList);
}


}
